<template>
	<view class="contents" :style="'height:'+screenHeight+'px;'">
		
			<view class="none" v-if="show">
				<view class="coent">
					<u-empty text="暂无详情" mode="list" icon-size="200">
					</u-empty>
				</view>
			</view>
			<view class="conentaa">
				<view class="listxq">
					<view class="lista" style="margin-bottom: 10rpx;">
						<span>科室:&nbsp;<span style="font-weight: bold;">{{datalist.DptName}}</span></span>
					</view>
					<view class="listb">
						<!-- <span>编号:&nbsp;{{datalist.DptCode}}</span> -->
						<span>{{datalist.CompanyName}}</span>
					</view>
					<view class="" style="padding: 30rpx;">
						<span v-html="datalist.Description"></span>
					</view>
				</view>
				
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				DepartmentId:'',
				jianyival:'',
				screenHeight: getApp().globalData.screenHeight-44,
				datalist: '',
				}
		},
		onLoad:function(option){
			this.DepartmentId=option.id
			this.lista()
		},
		methods: {
			lista() {
				
				this.$request("HisDpt","Detail",
				{DepartmentId:this.DepartmentId}
				).then(res => {
					console.log("科室详情", res)
					if (res.code == 1) {
						this.datalist = res.data.rows[0]
						this.show=false
					} else {
						this.show=true
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
				}).catch(err => {
					this.show=true
					console.log("err", err)
					uni.showToast({
						title: err,
						icon: 'none',
						duration: 1000
					});
				});
			}
		}
	}
</script>

<style>
	@import './charge.css';
</style>